package com.zhentao.product.controller;

import com.zhentao.login.utils.Result;
import com.zhentao.nlz.project.dto.DictionaryDto;
import com.zhentao.product.service.TLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("tLog")
public class TLogController {
    @Autowired
    private TLogService tLogService;

    @GetMapping("list")
    public Result list(DictionaryDto dictionaryDto){
        return tLogService.PageLog(dictionaryDto);
    }

    @DeleteMapping("delete")
    public Result delete(Long id){
        boolean b = tLogService.removeById(id);
        return b?Result.success("删除成功"):Result.error("删除失败");
    }
}
